package org.alis.smallcc.designpatterns.behavior.state;

import org.alis.smallcc.designpatterns.behavior.memento.Originator;
import org.apache.commons.lang3.StringUtils;

public class StopState implements State{

	@Override
	public String currentState() {
		return "停止状态";
	}

	@Override
	public boolean canChanage(Originator context) {
		if(StringUtils.equals(context.getState(),currentState())) {
			System.out.println("已经停止就不能停止了");
			return false;
		}
		return true;
	}

}
